//
//  ServicefiltersModel.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/9.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "ServicefiltersModel.h"

@implementation ServicefiltersModel
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr1 = [NSMutableArray array];
    NSMutableArray *arr2 = [NSMutableArray array];
    NSMutableArray *arr3 = [NSMutableArray array];
    NSMutableArray *arr4 = [NSMutableArray array];
    if ([key isEqualToString:@"intention"]) {
        self.s_type_group = [[value objectForKey:@"s_type_group"] integerValue];
        self.target_name = [value objectForKey:@"target_name"];
    }if ([key isEqualToString:@"poi"]) {
        for (NSDictionary *dic in value) {
            ServicefiltersPoiModel *model = [ServicefiltersPoiModel modelWithDic:dic];
            [arr1 addObject:model];
        }
        self.poi = arr1;
    }if ([key isEqualToString:@"type"]) {
        for (NSDictionary *dic in value) {
            ServicefiltersTypeModel *model = [ServicefiltersTypeModel modelWithDic:dic];
            [arr2 addObject:model];
        }
        self.type = arr2;
    }if ([key isEqualToString:@"extra"]) {
        for (NSDictionary *dic in value) {
            ServicefiltersExtraModel *model = [ServicefiltersExtraModel modelWithDic:dic];
            [arr3 addObject:model];
        }
        self.extra = arr3;
    }if ([key isEqualToString:@"order"]) {
        for (NSDictionary *dic in value) {
            ServicefiltersOrderModel *model = [ServicefiltersOrderModel modelWithDic:dic];
            [arr4 addObject:model];
        }
        self.order = arr4;
    }
}
@end
